/*
 * Overinfection.h
 * Behavioral Attributed Automaton
 * @author Gregoire JACOB (gregoire.jacob@orange-ftgroup.com)
 * @date 01/12/2008
 * @version 2.2
 * Overinfection test parser automaton
 */

//Set of parallel automata for overinfection
struct PARALLEL_AUTOMATA overinfection;

/**
 * initOverinfectionAutomata()
 * Initialize the set of parallel automata as unique
 * automaton in a starting state
 */
void initOverinfectionAutomata();

/**
 * parseIntermediateRules()
 * @param the first argument identifier
 * @param the first argument type		
 * @param the second argument identifier	
 * @param the second argument type	
 * Parse the given rules and updates the automata
 * satisfying the syntactic and semantic rules
 */
void parseOverCreate(long argid, int argtype);
void parseOverOpen(long argid, int argtype);
void parseOverTransfer(long arg1id, int arg1type, long arg2id, int arg2type);
void parseOverStop();
void parseOverTest1();
void parseOverTest2();

/**
 * updateOverinfectionAutomata()
 * @param the current operation
 * @param the first argument identifier		(optional (0))
 * @param the first argument type			(optional (0))
 * @param the second argument identifier	(optional (0))
 * @param the second argument type			(optional (0))
 * Updates the progression of the different automata according
 * to the current lexical unit. May start new automaton
 */
void updateOverinfectionAutomata(unsigned long operation,
							   long arg1id, int arg1type,
							   long arg2id, int arg2type);